package com.lxb.store.Untils;

import java.util.ArrayList;
import java.util.List;

public class CommendUntil {

    public static List<Object> handleCommend(float commend){

        List<Object> list = new ArrayList<>();

        for(int i = 0 ;i<5;i++){

            if(commend >= 1){
                list.add(i,1);
            }
            else if(commend == 0.5){
                list.add(i,0.5);
            }
            else{
                list.add(i,0);
            }
            commend -= 1;
        }
        return list;
    }
}
